
import requests

IP = "192.168.1.10"     # server ip

if __name__ == "__main__":
    key = "python_post"
    val = 1001
    url = "http://%s/weather/main.php?cmd=setdata&key=%s&val=%d" % (IP, key, val)
    r = requests.get(url)
    print(r.text)